<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
         <fieldset v-for="item of models">
             <legend>{{item.fields}}</legend>
             <input type="text" v-model=item.val>
         </fieldset>
         <button @click="submit">提交</button>
    </div>
    <script src='https://cdn.jsdelivr.net/npm/vue@2.7.14/dist/vue.js'></script>
    <script>
        const vm = new Vue({
            el:"#app",
            data:{
                models:[{val:"",fields:"username"},{val:"",fields:"password"},{val:"",fields:"e-mail"},{val:"",fields:"QQ"},{val:"",fields:"微信"}]
            },
            methods:{
              submit(){
                 let res = this.models.map(item =>{
                    return item.val
                 });
                 console.log(res);
              }
            }
        })
    </script>
</body>
</html>